#pragma once
#ifndef LBFGSBOPT_H
#define LBFGSBOPT_H

#include <vector>
#include "OptData.h"
#include "Constraint.h"
#include <iostream>
#include "math.h"
#include "lbfgsb.h"

using namespace std;

class LBFGSBopt
{
public:
	static LBFGSBopt* Instance();

	void optimization(vector<double> *resutlWeight,OptData* optData, vector<SConstraint> *pConstrain, vector<double> *objFunValue,int maxIter=100, double LBound=0.0);


	int nmax;
	int mmax;
	int charLength;

private:
	LBFGSBopt(void);
	~LBFGSBopt(void);

	//static vector<double> *g_pDose;
	static OptData *g_optData;
	static vector<SConstraint> *g_pConstraints;
	static vector<double> *g_objFunValue;

};

#endif